﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace JMT.Res
{
    public static class JRes
    {
        public static string GetIconPath(JMT.Data.IJModel jModel)
        {
            if (jModel is JMT.Data.JDiagram)
            {
                return "/JMT.Res;component/Icons/diagram.png";
            }
            else if (jModel is JMT.Data.JPackage)
            {
                return "/JMT.Res;component/Icons/package.png";
            }
            else if (jModel is JMT.Data.JMSolution)
            {
                return "/JMT.Res;component/Icons/solution.png";
            }
            else if (jModel is JMT.Data.JClass)
            {
                JMT.Data.JClass jClass = jModel as JMT.Data.JClass;
                return string.Format("/JMT.Res;component/Icons/{0}.png", jClass.Type);
            }
            else if (jModel is JMT.Data.JInterface)
            {
                return "/JMT.Res;component/Icons/interface.png";
            }
            else if (jModel is JMT.Data.JProperty)
            {
                return "/JMT.Res;component/Icons/property.png";
            }
            else if (jModel is JMT.Data.JMethod)
            {
                return "/JMT.Res;component/Icons/method.png";
            }
            return "/JMT.Res;component/Icons/plugin.png";
        }
    }
}
